//vuex 仓库
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

//搜索到的值
const search = {
	searching: ''
}



//发表成功页面不跟新所以传值给vuex让computed属性监听
const roturn = {
	pagesising: false

}
const PageShuaxin ={
	PageShuaxining:false
}





const commentsIds = {
	commentsIding: ''
}

//赞
const likesId ={
	likesIding:""
}

// //刷新赞
const zanSs ={
	zanSsing:true
}
const state = {
	search,
	commentsIds,
	roturn,
	PageShuaxin,
	likesId,
	zanSs
}

export default new Vuex.Store({
	state,
	mutations: {
		srerchData(state, homeDatas) {
			console.log("发表仓库值", homeDatas)
			state.search = {
				searching: homeDatas
			}
		},

		commentsId(state, ids) {
			console.log("发表仓库值1", ids)
			state.commentsIds = {
				commentsIding: ids
			}
		},
		//发表成功页面不跟新所以传值给vuex让computed属性监听
		roturnMuta(state, pagesis) {
			console.log("发表仓库值2", pagesis)
			state.roturn = {
				pagesising: pagesis
			}
		},
		
		//发表成功页面不跟新所以传值给vuex让computed属性监听
		shuaxinPage(state,shuaxin){
			console.log("发表仓库值", shuaxin)
			state.PageShuaxin ={
				PageShuaxining:shuaxin
			}
		},
		//赞的传值
		likes(state,mylikes){
			console.log("发表仓库zan值", mylikes)
			state.likesId ={
				likesIding:mylikes
			}
		},
		//赞的刷新
		zanS(state,zanShuaxin){
			console.log("发表仓库zan刷新值", zanShuaxin)
			state.zanSs ={
				zanSsing:zanShuaxin
			}
		}
	}
})
